A number of short-range or personal area network (PAN) mirroring systems transmit video and/or audio files, or otherwise what is viewed on the screen and audible on a transmitting device, and typically to a remote receiving device that is more convenient or provides a better experience for viewing or listening to the video and/or audio. For example, a movie may be played or processed on a smartphone while viewing the video of the movie and listening to the audio on a large television. In other examples, the screen of a laptop may be transmitted to a conference room projector, or a cable box may transmit a show to a smaller device such as a tablet in addition to, or instead of, the television.
In order to transmit media that includes audio data, these PAN systems establish a balance between audio quality and latency. Specifically, in order to raise the quality of the audio, a sufficient number of frames associated with packets of audio data, or video and audio data, are stored in a jitter buffer (or more accurately, de-jitter buffer) at the receiving (or sink) device ready for decoding and rendering (display of video and emission of audio through one or more speakers). The buffer holds the frames until a decoder is ready for the frames. If the buffer is too small, frames that arrive early at the receiver are dropped when there is no capacity to hold the frames in the buffer. On the other hand, when the frames are late according to the decoder's clock at the receiver, the frames also are dropped instead of being stored in the buffer, and these late arrival drops may occur regardless of the size of the buffer. Either way, the dropped frames may cause audio drops that create a pause in the audio (and may indicate a pause in the video) that can be noticeable to a user especially when a sequence of frames is dropped.
To at least resolve issues with a small jitter buffer, the jitter buffer capacity may be increased. The larger the jitter buffer for storing more frames, however, the greater the latency between the display (or processing) of a video and audio on the transmitting device and the rendering of the video and audio on the receiving device due to the time it consumes for a frame to be fetched in a certain order (such as first-in, first-out (FIFO)) from the buffer. The latency may result in noticeable delays in a video display and audio emission, or becomes difficult or even impossible to use the transmitting device to control what is viewed on the receiving device (such as with video games or by controlling a cursor at the source and that is viewed at the receiver). The conventional mirror systems still inadequately compensate for changes in streaming delays from the transmitter to the receiver resulting in too many audio drops or too much latency.